import { Layout, Button, Typography, Divider } from 'antd';
import PropTypes from 'prop-types';

const { Header } = Layout;
const { Title, Text } = Typography;

const AddAd = ({ setIsAdding }) => {
    return (
        <div>
            <Layout>
                <Header style={{
                    background: '#fff',
                    padding: '10px',
                    display: 'flex',
                    flexDirection: 'column',
                    alignItems: 'start',
                    height: 'auto'
                }}>
                    <Divider style={{ margin: '1px 0', width: '100%' }} />
                    <Title level={4} style={{ marginBottom: '0.5em', fontSize: '16px' }}>广告管理</Title>
                    <Text style={{ fontSize: '12px', marginBottom: '8px' }}>
                        一告信息展示，可以进行新增广告，更改广告，删除广告操作。注意:最多只允许5个广告位
                    </Text>
                    <Divider style={{ margin: '8px 0', width: '100%' }} />
                    <Button
                        type="primary"
                        onClick={() => setIsAdding(true)}
                    >
                        新增广告
                    </Button>
                </Header>
            </Layout>
        </div>
    );
};

AddAd.propTypes = {
    setIsAdding: PropTypes.func.isRequired,
};

export default AddAd;
